package zhongbo.java.air.dictionary.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@ApiModel("飞机信息")
@TableName("air_alert_zone")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AlertZone {
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("id")
    private String id;
    @TableField("zone_code")
    @ApiModelProperty("区域业务编号（如 BJ_NOFLY_001）")
    private String zoneCode;
    @TableField("zone_type")
    @ApiModelProperty("区域类型（枚举值：NO_FLY-禁飞区, RESTRICTED-限制区, TEMPORARY-临时区）")
    private String zoneType;
    @TableField(value = "vertices", typeHandler = JacksonTypeHandler.class)
    @ApiModelProperty("多边形顶点坐标（JSON格式：[{\"lat\":39.9,\"lng\":116.3},...]）")
    private List<PointDto> vertices;
    @TableField("effective_start")
    @ApiModelProperty("生效开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date effectiveStart;
    @TableField("effective_end")
    @ApiModelProperty("生效结束时间（NULL表示永久有效）")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date effectiveEnd;
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    private Date creatTime;
    @TableField("update_time")
    @ApiModelProperty("更新时间")
    private Date updateTime;


}
